package com.takeoutsystem.service.impl;

import com.takeoutsystem.bean.StorageRecord;
import com.takeoutsystem.bean.StorageRemain;
import com.takeoutsystem.dao.TakeoutRemainMapper;
import com.takeoutsystem.service.RemainTakeoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RemainTakeoutServiceImpl implements RemainTakeoutService {
    @Autowired
    TakeoutRemainMapper remainMapper;

    @Override
    public boolean removeOrderInCab(String cabId) {
        int result=remainMapper.removeById(cabId);
        return result>0;
    }

    @Override
    public StorageRemain getByCabNumber(String cabId) {
        return remainMapper.getByCabNumber(cabId);
    }

    @Override
    public boolean saveOrder(StorageRemain remain) {
        int result=remainMapper.saveOrder(remain);
        return  result>0;
    }


}
